package com.wn.mapper;

import com.wn.common.pojo.Order;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

import java.util.Date;
import java.util.List;

public interface OrderMapper {
    int deleteByPrimaryKey(@Param("id") Integer id,@Param("updateUserId")Integer updateUserId,@Param("updateTime")Date updateTime);

    int deleteOrderToTraveller(@Param("orderId") Integer orderId,@Param("updateUserId")Integer updateUserId);

    int insert(Order record);

    int insertSelective(Order record);

    int insertOrderTraveller(@Param("orderId") int orderId,@Param("travellerId") int travellerId,@Param("createUserId") Integer createUserId,@Param("createTime")Date createTime);
    int updateOrderTraveller(@Param("orderId") int orderId,@Param("travellerId") int travellerId,@Param("updateUserId") Integer updateUserId,@Param("updateTime")Date updateTime);


    Order selectByPrimaryKey(Integer id);

    List<Order> selectByCondition(Order order);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);
    //支付扫码修改订单状态
    void updateStatus(String outTradeNo);

    //修改订单的状态和支付时间
    int updateOrderStatus(Order order);

    //支付扫码查询订单状态
    Order queryOrderStatusFromDB(@Param("orderPayNumber") String orderPayNumber);
}
